package com.api.sign.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FilterConfig {

    @Autowired
    private SignAuthFilter signAuthFilter;

    @Bean
    public FilterRegistrationBean registFilter() {
        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setFilter(signAuthFilter);
        registration.addUrlPatterns("/*");
        registration.setName("signAuthFilter");
        registration.setOrder(1);
        return registration;
    }

}
